﻿using Kingdee.BOS;
using Kingdee.BOS.Core.DynamicForm;
using Kingdee.BOS.Core.DynamicForm.PlugIn;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.Orm.DataEntity;
using Kingdee.BOS.Util;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RK.SerivesPlugin.BPW
{
    [Description("销售出库单保存时，校验是否超发"), HotUpdate]
    public class OutStockCheckOut : AbstractOperationServicePlugIn
    {
        public override void BeforeExecuteOperationTransaction(BeforeExecuteOperationTransaction e)
        {
            Context ctx = ObjectUtils.CreateCopy(this.Context) as Context;
            base.BeforeExecuteOperationTransaction(e);
            foreach (var obj in e.SelectedRows.Select(s => s.DataEntity))
            {
                if (obj == null) { return; }
                DynamicObjectCollection rows = obj["SAL_OUTSTOCKENTRY"] as DynamicObjectCollection;
                foreach (var row in rows)
                {
                    int eId = Convert.ToInt32(row[0]);
                }
            }
        }
    }
}
